/*
 * XML Type:  ContributionInfo
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.ContributionInfo
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML ContributionInfo(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class ContributionInfoImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.ContributionInfo
{
    
    public ContributionInfoImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CONTRIBSECURITY$0 = 
        new javax.xml.namespace.QName("", "CONTRIBSECURITY");
    
    
    /**
     * Gets array of all "CONTRIBSECURITY" elements
     */
    public net.ofx.types.x2003.x04.ContributionSecurity[] getCONTRIBSECURITYArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CONTRIBSECURITY$0, targetList);
            net.ofx.types.x2003.x04.ContributionSecurity[] result = new net.ofx.types.x2003.x04.ContributionSecurity[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "CONTRIBSECURITY" element
     */
    public net.ofx.types.x2003.x04.ContributionSecurity getCONTRIBSECURITYArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ContributionSecurity target = null;
            target = (net.ofx.types.x2003.x04.ContributionSecurity)get_store().find_element_user(CONTRIBSECURITY$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "CONTRIBSECURITY" element
     */
    public int sizeOfCONTRIBSECURITYArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CONTRIBSECURITY$0);
        }
    }
    
    /**
     * Sets array of all "CONTRIBSECURITY" element
     */
    public void setCONTRIBSECURITYArray(net.ofx.types.x2003.x04.ContributionSecurity[] contribsecurityArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(contribsecurityArray, CONTRIBSECURITY$0);
        }
    }
    
    /**
     * Sets ith "CONTRIBSECURITY" element
     */
    public void setCONTRIBSECURITYArray(int i, net.ofx.types.x2003.x04.ContributionSecurity contribsecurity)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ContributionSecurity target = null;
            target = (net.ofx.types.x2003.x04.ContributionSecurity)get_store().find_element_user(CONTRIBSECURITY$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(contribsecurity);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "CONTRIBSECURITY" element
     */
    public net.ofx.types.x2003.x04.ContributionSecurity insertNewCONTRIBSECURITY(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ContributionSecurity target = null;
            target = (net.ofx.types.x2003.x04.ContributionSecurity)get_store().insert_element_user(CONTRIBSECURITY$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "CONTRIBSECURITY" element
     */
    public net.ofx.types.x2003.x04.ContributionSecurity addNewCONTRIBSECURITY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ContributionSecurity target = null;
            target = (net.ofx.types.x2003.x04.ContributionSecurity)get_store().add_element_user(CONTRIBSECURITY$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "CONTRIBSECURITY" element
     */
    public void removeCONTRIBSECURITY(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CONTRIBSECURITY$0, i);
        }
    }
}
